package cn.imokay.mybatis.mapper;

import cn.imokay.mybatis.pojo.*;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public interface UserMapper {
    int insertUser();

    User selectUserById();

    List<User> selectAllUser();

    User selectByArgs1(String username);

    User selectByArgs2(String username, Integer idid);

    User selectByArgs3(@Param("u1") String username, @Param("i1") Integer idid);

    @MapKey("id")
    Map<String, Object> selectAllTomap();

    int insertAndGetAutoId(User user);

    List<TransLog> getTransLogByUser(@Param("user_id") Integer user_id);

    List<UserTransLog> getUserTransLogs(@Param("user_id") Integer user_id);

    TransLogMapUser getTransLogMapUser(@Param("transSerialNo") Integer transSerialNo);

    TransLogMapUser selectUserAndTransLogByStep(@Param("transSerialNo") Integer transSerialNo);

    User selectUserByIdArg(Integer userid);

    UserMapTransLog selectUserMapTransLogs(@Param("user_id") Integer user_id);

    UserMapTransLog selectUserMapTransLogsByStep(@Param("user_id") Integer user_id);

    List<TransLog> seelctTransLogByCondition(TransLog q);

    List<TransLog> seelctTransLogByChoose(TransLog q);

    int deleteByArray(@Param("userIds") Integer[] integers);
    int deleteByArray2(@Param("userIds") Integer[] integers);

    int insertArray(@Param("users") ArrayList<User> users);
}
